package com.jianganming.proxy.myproxy;

public class Test {
    public static void main(String[] args) {
        Zhanglaoshi zhanglaoshi = new Zhanglaoshi();
        Object o = MyProxy.newProxyInstance(zhanglaoshi.getClass().getInterfaces(), new MyHandler(zhanglaoshi));
        Teacher teacher = (Teacher) o;
        System.out.println(teacher.getAge());
        //teacher.each();
        // paly = (Paly)o;
        //paly.paly();
    }
}
